.class public Lde/dealdoktor/app/activities/Settings;
.super Landroid/preference/PreferenceActivity;
.source "Settings.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 16
    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lde/dealdoktor/app/activities/Settings;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 79
    invoke-direct {p0, p1}, Lde/dealdoktor/app/activities/Settings;->setPushPreferencesStatus(Z)V

    return-void
.end method

.method static synthetic access$1(Lde/dealdoktor/app/activities/Settings;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 92
    invoke-direct {p0, p1}, Lde/dealdoktor/app/activities/Settings;->setNightSleepPreferencesStatus(Z)V

    return-void
.end method

.method private setNightSleepPreferencesStatus(Z)V
    .locals 2
    .parameter "enabled"

    .prologue
    .line 93
    const v1, 0x7f080009

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 94
    .local v0, pref:Landroid/preference/Preference;
    invoke-virtual {v0, p1}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 95
    const v1, 0x7f080008

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 96
    invoke-virtual {v0, p1}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 97
    return-void
.end method

.method private setPushPreferencesStatus(Z)V
    .locals 5
    .parameter "enabled"

    .prologue
    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 80
    const v2, 0x7f080007

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    check-cast v1, Landroid/preference/CheckBoxPreference;

    .line 81
    .local v1, prefNightSleep:Landroid/preference/CheckBoxPreference;
    invoke-virtual {v1, p1}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V

    .line 82
    const v2, 0x7f080009

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 83
    .local v0, pref:Landroid/preference/Preference;
    invoke-virtual {v1}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v2

    if-eqz v2, :cond_0

    if-eqz p1, :cond_0

    move v2, v3

    :goto_0
    invoke-virtual {v0, v2}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 84
    const v2, 0x7f080008

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 85
    invoke-virtual {v1}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v2

    if-eqz v2, :cond_1

    if-eqz p1, :cond_1

    :goto_1
    invoke-virtual {v0, v3}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 86
    const v2, 0x7f08000a

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 87
    invoke-virtual {v0, p1}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 88
    const v2, 0x7f08000d

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 89
    invoke-virtual {v0, p1}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 90
    return-void

    :cond_0
    move v2, v4

    .line 83
    goto :goto_0

    :cond_1
    move v3, v4

    .line 85
    goto :goto_1
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter "savedInstanceState"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 20
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    .line 21
    const v3, 0x7f030004

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->addPreferencesFromResource(I)V

    .line 23
    const v3, 0x7f080006

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    check-cast v2, Landroid/preference/CheckBoxPreference;

    .line 24
    .local v2, prefNotificationsStatus:Landroid/preference/CheckBoxPreference;
    const v3, 0x7f080007

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    check-cast v1, Landroid/preference/CheckBoxPreference;

    .line 26
    .local v1, prefNigthSleepStatus:Landroid/preference/CheckBoxPreference;
    const-string v3, "about"

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/activities/Settings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 27
    .local v0, myPref:Landroid/preference/Preference;
    new-instance v3, Lde/dealdoktor/app/activities/Settings$1;

    invoke-direct {v3, p0}, Lde/dealdoktor/app/activities/Settings$1;-><init>(Lde/dealdoktor/app/activities/Settings;)V

    invoke-virtual {v0, v3}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 48
    invoke-virtual {v2}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v3

    if-eqz v3, :cond_0

    move v3, v4

    :goto_0
    invoke-direct {p0, v3}, Lde/dealdoktor/app/activities/Settings;->setPushPreferencesStatus(Z)V

    .line 50
    new-instance v3, Lde/dealdoktor/app/activities/Settings$2;

    invoke-direct {v3, p0}, Lde/dealdoktor/app/activities/Settings$2;-><init>(Lde/dealdoktor/app/activities/Settings;)V

    invoke-virtual {v2, v3}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 63
    invoke-virtual {v1}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-virtual {v2}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v3

    if-nez v3, :cond_1

    :goto_1
    invoke-direct {p0, v5}, Lde/dealdoktor/app/activities/Settings;->setNightSleepPreferencesStatus(Z)V

    .line 65
    new-instance v3, Lde/dealdoktor/app/activities/Settings$3;

    invoke-direct {v3, p0}, Lde/dealdoktor/app/activities/Settings$3;-><init>(Lde/dealdoktor/app/activities/Settings;)V

    invoke-virtual {v1, v3}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 77
    return-void

    :cond_0
    move v3, v5

    .line 48
    goto :goto_0

    :cond_1
    move v5, v4

    .line 63
    goto :goto_1
.end method
